
# -*- coding: utf-8 -*-

import tornado.web
from config.Config import isAdmin
from controllers.BaseController import BaseController

class MarkingsController(BaseController):

	@tornado.web.authenticated
	def get(self):
		try:
			userid = int(self.get_secure_cookie('userid'))
			if userid > 0:
				self.add_header('Access-Control-Allow-Origin', '*')
				self.render("facedetect.html", userid=self.get_secure_cookie('userid'), admin=isAdmin(userid))
				return
		except:
			pass
		self.redirect("/markings")
